package net.neptech.model.workflow;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.persistence.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;


/**
 * @Author Saya
 * @Date 2025/8/19 12:08
 * @Description TODO
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Builder
@Table(name = "workflow_starter")
@TableName("workflow_starter")
public class WorkflowStarter {

    /**
     * 用户id或者部门id
     */
    @TableField("starter_id")
    @TableId

    @Id
    @GeneratedValue(strategy = GenerationType.UUID)
    private String starterId;

    /**
     * 类型 user dept
     */
    @TableField("type")
    private String type;

    /**
     * 流程表id TODO????
     */
    @TableField("process_id")
    private String processId;

    /**
     * 流程id
     */
    @TableField("flow_id")
    private String flowId;

    /**
     * 数据
     */
    @TableField("data")
    private String data;

    /**
     * 是否包含下级部门
     */
    @TableField("contain_children_dept")
    private Boolean containChildrenDept;
    /**
     * 逻辑删除字段
     */
    @TableField("deleted")
    @Column(name = "deleted")
    private Boolean deleted;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @Column(name = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField("update_time")
    @Column(name = "update_time")
    private Date updateTime;
}
